﻿using System.IO;
using FreshMeat.Storage;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Storage.More.Test
{
   [TestClass]
   public class FileSystemTest : CommonFileSystemTest
   {
      protected override IFileSystem CreateSystem()
      {
         var rootFolder = System.IO.Path.Combine(TestContext.TestDir, System.IO.Path.GetRandomFileName());
         Directory.CreateDirectory(rootFolder);

         return new FileSystem(rootFolder);
      }

      // ReSharper disable MemberCanBePrivate.Global
      // ReSharper disable UnusedAutoPropertyAccessor.Global
      public TestContext TestContext { get; set; }
      // ReSharper restore UnusedAutoPropertyAccessor.Global
      // ReSharper restore MemberCanBePrivate.Global
   }

   [TestClass]
   public class FileSystemAsyncTest : CommonFileSystemAsyncTest
   {
      protected override IFileSystem CreateSystem()
      {
         var rootFolder = System.IO.Path.Combine(TestContext.TestDir, System.IO.Path.GetRandomFileName());
         Directory.CreateDirectory(rootFolder);

         return new FileSystem(rootFolder);
      }

      // ReSharper disable MemberCanBePrivate.Global
      // ReSharper disable UnusedAutoPropertyAccessor.Global
      public TestContext TestContext { get; set; }
      // ReSharper restore UnusedAutoPropertyAccessor.Global
      // ReSharper restore MemberCanBePrivate.Global
   }
}
